<#--
/*
 * $Id: pager.ftl 11 2009-03-27 06:33:32Z a.ruggles $
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
-->
<#if (parameters.total > 1)>
<ul<#rt/>
<#if parameters.id??>
 id="${parameters.id?html}"<#rt/>
</#if>
<#include "/${parameters.templateDir}/epoch/css.ftl" />
<#include "/${parameters.templateDir}/epoch/scripting-events.ftl" />
<#include "/${parameters.templateDir}/epoch/common-attributes.ftl" />
<#include "/${parameters.templateDir}/epoch/dynamic-attributes.ftl" />
>
<#if parameters.page == 1>
	<li class="off previous">&laquo;<#if parameters.prevLabel??> ${parameters.prevLabel?html}</#if></li>
<#else>
	<li class="previous"><a href="${parameters.hrefValue}${parameters.page - 1}">&laquo;<#if parameters.prevLabel??> ${parameters.prevLabel?html}</#if></a></li>
</#if>
<#if (parameters.page - 4) < 1>
	<#assign startPage=1>
<#else>
	<#assign startPage = parameters.page - 4>
	<li><a href="${parameters.hrefValue}1">1</a></li>
	<li class="elipse">...</li>
</#if>
<#if parameters.page < (parameters.total - 5)>
	<#assign endPage=parameters.page + 4>
<#else>
	<#assign endPage=parameters.total>
</#if>
<#list startPage..endPage as currPage>
	<#if currPage == parameters.page>
	<li class="active">${currPage}</li>
	<#else>
	<li><a href="${parameters.hrefValue}${currPage}">${currPage}</a></li>
	</#if>
</#list>
<#if endPage != parameters.total>
	<li class="elipse">...</li>
	<li><a href="${parameters.hrefValue}${parameters.total}">${parameters.total}</a></li>
</#if>
<#if parameters.page == parameters.total>
	<li class="off next"><#if parameters.nextLabel??>${parameters.nextLabel?html} </#if>&raquo;</li>
<#else>
	<li class="next"><a href="${parameters.hrefValue}${parameters.page + 1}"><#if parameters.nextLabel??>${parameters.nextLabel?html} </#if>&raquo;</a></li>
</#if>
</ul>
</#if>